﻿@{
    ViewBag.Title = "个人资料·自由飞·任务管理系统";
    Layout = "~/Views/Shared/_Layout_Dual_Columns_Big.cshtml";
}
@using Global.Core.ExtensionMethod
@using FFLTask.SRV.ViewModel.User
@model FFLTask.SRV.ViewModel.User.SummaryModel
@section RightTitle{
    <h2>历史快照</h2>
}
@section Introduction{
    <ul>
        <li>这里将显示用户曾经参与的项目，及其任务汇总（未实现）</li>
    </ul>
}
<div>
    <h3>个人资料</h3>
    @if (Model.IsCurrentUser)
    {
        <a href="/User/Profile" class="owner_opt" style="float:right; margin-right: 56px;">修改</a>
    }
    @Html.Partial("_ProfileReadOnly", Model.Profile ?? new ProfileModel())
    <h3 style="margin-top:28px">已加入项目</h3>
    <table>
        <tr><th>编号</th><th>名称</th><th>管理</th><th>分配</th><th>承接</th></tr>
        @foreach (var item in Model.JoinedProjects)
        {
            <tr>
                <td>@item.ProjectId</td>
                <td>@Html.Action("_LiteralLinkedProject", "Project", new { projectId = item.ProjectId })</td>
                <td>@item.IsAdmin</td>
                <td>@item.IsPublisher</td>
                <td>@item.IsOwner</td>
            </tr>
        }
    </table>
</div>